package edu.wust;


public class No1exam2 {
    public static void main(String[] args){
        long data1=1,data2=2,sum=0;
        while(data2<4000000){
            long temp=data2;
            if(data2%2==0)
                sum+=data2;
            data2=data1+data2;
            data1=temp;
        }
        System.out.println(sum);
    }
}
